package com.liufeng.test.spring.aop;

import org.aspectj.lang.annotation.*;

public class ApiObjectAOP {

    @Pointcut("execution(* com.liufeng.test.spring.jar.APIObject.add*(..))")
    public void print() {

    }

    @Before("print()")

    public void before() {
        System.out.println("=======================切点方法前===============");
    }

    @After("print()")

    public void after() {

        System.out.println("=======================切点方法后===============");
    }

    @AfterReturning("print()")

    public void afterRunning() {
        System.out.println("=======================正确运行===============");
    }

    @AfterThrowing("print()")
    public void afterError() {
        System.out.println("=======================出错了===============");
    }


}
